include_directories(
    ${BASE_SOURCE_DIR}/include
    ${PROJECT_SOURCE_DIR}/include
)

add_executable(server${OUTPUT_SUFFIX} 
    Server.cpp ServiceMgr.cpp
)

#注意顺序符合gcc链接顺序的规则，即被依赖的库放在依赖它的库的后面
target_link_libraries(
    server${OUTPUT_SUFFIX}     
    
    #工程
    dbproxy${OUTPUT_SUFFIX}
    dboption${OUTPUT_SUFFIX}
    centerserver${OUTPUT_SUFFIX}
    logicserver${OUTPUT_SUFFIX}
    loginserver${OUTPUT_SUFFIX}
    gateserver${OUTPUT_SUFFIX}
    zoneserver${OUTPUT_SUFFIX}
    masterserver${OUTPUT_SUFFIX}
    logserver${OUTPUT_SUFFIX}
    common${OUTPUT_SUFFIX}
    
    #基础
    network${OUTPUT_SUFFIX} 
    core${OUTPUT_SUFFIX}
    

    #自己编译的第三方
    curl${OUTPUT_SUFFIX} 
    detour${OUTPUT_SUFFIX} 
    detourcrowd${OUTPUT_SUFFIX}
    detourtilecache${OUTPUT_SUFFIX} 
    lua51${OUTPUT_SUFFIX}
    protobuf${OUTPUT_SUFFIX}
    protobuf-lite${OUTPUT_SUFFIX}
    protoc${OUTPUT_SUFFIX}
    recast${OUTPUT_SUFFIX}
    ssl${OUTPUT_SUFFIX}
    behaviac${OUTPUT_SUFFIX}

    #第三方库或系统库
    #bson-1.0 
    charset
    dl
    hiredis
    mysqlclient
    pthread 
    rt 
    uuid
)

#install(TARGETS server${OUTPUT_SUFFIX} RUNTIME DESTINATION ${PRODUCTS_OUTPUT_PATH})

